/*
* Conditions Of Use
*
* This software was developed by employees of the Sigmatrix(Beijing) Corporation.
* This software is provided by sigmatrix as a service and is expressly
* provided "AS IS."  Sigmatrix MAKES NO WARRANTY OF ANY KIND, EXPRESS, IMPLIED
* OR STATUTORY, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTY OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT
* AND DATA ACCURACY.  Sigmatrix does not warrant or make any representations
* regarding the use of the software or the results thereof, including but
* not limited to the correctness, accuracy, reliability or usefulness of
* the software.
*
* Permission to use this software is contingent upon your acceptance
* of the terms of this agreement.
*
*/
package com.sigmatrix.h5.enums;

import java.util.HashMap;
import java.util.Map;

/**
 *@ClassName: InStorageStatusEnum
 *@Description: 出入库单状态
 *@author youjun
 *@date 2017年8月6日 下午5:48:50
 */
public enum InStorageStatusEnum {
	
	/**未分配*/
	NO_ALLOT(2, "未分配"),
	
	/**未审核*/
	NO_AUDIT(3, "未审核"),
	
	/**已审核*/
	HAS_AUDIT(4, "已审核"),
	
	/**进行中*/
	PROCEED_ING(5, "进行中"),
	
	/**已完成*/
	COMPLETE(6, "已完成"),
	
	/**已关闭*/
	CLOSE(7, "已关闭"),
	
	/**有异常*/
	EXCEPTION(8, "有异常"), 
	
	/**特殊的状态:为手持机同步接口,在返回map中排除*/
	SPECIAL_FOR_PDA_SYNC_LIST(-2, "特殊的状态:为手持机同步接口");

	private Integer id;
	
	private String name;
	
	private InStorageStatusEnum(final Integer id, final String name) {
		this.id = id;
		this.name = name;
	}

	/**
	 *@Title: getAll
	 *@Description: TODO()
	 *@return Map<Integer,String>
	 *@author youjun
	 *@date 2017年8月6日 下午5:50:10
	 *@return
	 */
	public static Map<Integer, String> getAll() {
		final Map<Integer, String> statusMap = new HashMap<Integer, String>();
		for(final InStorageStatusEnum item:InStorageStatusEnum.values()) {
			// 排除
			if(item.getId().intValue()==SPECIAL_FOR_PDA_SYNC_LIST.getId()) {
				continue;
			}
			statusMap.put(item.getId(), item.getName());
		}
		return statusMap;
	}
	
	/**
	 *@return the id
	 */
	public Integer getId() {
		return id;
	}

	/**
	 *@return the name
	 */
	public String getName() {
		return name;
	}
	
	
}
